when overwrite flag is set, should check if the target exists, rather than the targetPath
Merge pull request #111 from wushukai/master

when overwrite flag is set, should check if the target exists.