get the right format for the path