Set Cwd to the realpath, exclude all "../" etc.