getInputExtension function
Implementation
String getInputExtension(String inputPath) {
// get the extension of the input file with up to 2 components
// e.g. for file.tar.gz, it will return '.tar.gz'
return path.extension(inputPath, 2).toLowerCase();
}