Path not recognised by Terminal


I got a script working fine when I run it through the Terminal in OSX. Now the problem comes when the script finds those weird and annoying "/ " that Terminal replaces for each space when dropping folders. So the file path is not recognized. If I drop the desktop folder everything works as expected.

while True:
    path = raw_input('Enter the folder path: ').strip()
    if os.path.isdir(path):
        print('Your input is not a valid path. Please try again.')