Recursively create the base directory.
Ensure readlink is never invoked on the windows platform
Guard the move on the windows platform with a check to avoid trying to copy the file multiple times