using srcPath to get the extension

If I'm not mistaken the ```srcPath``` is the variable with the filename. 

The ```dest``` folder (which was originally used) was just the destination folder. 

Let me know if my implementation is at fault.