Removing single quotes; adding better logic for testing directory existence