Fixed 'directory not exists'

If directory does not exist this script creates it.