Added a profilepath option in the configuration file to place the gperftools cpu profiler's .prof file, if wanted
Hopefully corrected the code for Apple compilers (I don't have an Apple compiler).