check whether file/directory exists
Merge pull request #64 from mengxr/copy-dir

check whether file/directory exists in copy-dir