Fixed problem in moveBinary (main module in subdirectory)

When the main module was in a subdirectory, the compilation would
fail because of erroneous treatment of the path when moving the
binary. This fix corrects the error.
Potentially, the tracing support for Windows might be affected by
this patch, the run script needs a review (if we keep it at all).