Check whether a path is valid in Python without creating a file at the path's target,"open(filename, 'r')"