Move cwd of the build command to the object directory instead of the source directory.

Also, don't kill the object directory if it's the source directory.