pass cwd directly to proc_open() and revert changes to get_path()