More robust file move, was failing on some OSs

Silent failure of the final file move on Windows was causing problems.

Now move failures will be reported, and the move in general is more robust and succeeds where it previously failed.

In the case where the move does fail, the temp file is deleted, other wise it leaves the project in an unbuild-able state.