Added a function to convert path types

needs a change to handle special characters in Directory names