Fix input dir issue when path is above cwd