cdup: make the regexp not match the original full path. Otherwise, if the query matched both the current directory and an upper directory, the current full path would be returned. This was not the desired behavior because we obviously intend to go up the directory tree.
cdup: fix the bug: we could not go up to directories with spaces in their names.
cdup: make the regexp case-insensitive.