Build Directory Cleaning Functionality

This update adds code to remove build directories and intermediateJSON.json files that might be present from previous compilation and build runs. Prior to this change, successive builds would append all new data to the previously built files and incorrectly duplicate the command log within the intermediateJSON.json file.
What if you do this before replaying starts? 

That way you can just blindly delete the entire dir contents, which would eliminate a lot of logic in cleanBuildDir.