Electronic structure and magnetism of Ni overlayers on a Cu(001) substrate