Added support for file in the dest path

I added support for file in dest path.
You can specify a file name or directory in dest path.