testing dir existence 

According to bash help:

  -f FILE        True if file exists and is a regular file.

It is better to use -e since it can test for symlink too.
Merge pull request #18 from getupcloud/patch-1

testing dir existence