Checks if a given directory exists or creates it, if required.
Create a Path object from a string path.