os.cwd causing problems from upstart, changed it to realfile