tried to handle the non-forward slashes for directories