Fix relative dir path handling