gprof searches for gmon.out file in current working dir, which is where
the profiler executable is located.
cd exe_path added to popen