handling the case when output path is empty
normalising slashes across operating systems