replaced hasExtension function with path.extname, test with relatives paths