fix root file path for file paths other than /