Made changes to run the file joining code from the right directory. Plus formatting changes.