trim last slash on 'targz' argument so if we use it like 'targz dirname/'
it would create 'dirname.tar.gz' in the current directory
instead of creating a file named '.tar.gz' in 'dirname'