Replace all '/' in path to File.separator - Code Refactor