finalized HW4.cpp, constructed path.script file