Structure and magnetic properties of Co chains on a stepped Cu surface