Cleaning up project directory before generation. Refactored build-file, file-reference, and frameworks-build-phase sections into their own functions.