You need to remove the trailing newline from the user input.
In reply to Re: Verifying If a directory exists by moritz in thread Verifying If a directory exists by edimusrex