Added better filepath extension support

Changed (++) and the use of an intermediary function to use "replaceExtension" instead.
Merge branch 'patch-2' of github.com:Cipherwraith/hawk into Cipherwraith-patch-2
fix compilation error
Merge branch 'Cipherwraith-patch-2' into develop