Ok, now I got what's troubling you.
You should go with xform command anyways, and query world coordinates (funny enough, this approach of yours actually works with vertices on plane)..
Here you go:
Just to clarify xform command to you:
-q stands for query
-ws stands for world space
-t stands for translation
So, you query translations of each vert in world space (X, Y and Z), and then you move cube to that position, again with xform command.