trim last space on 'targz' argument

Currently, if we use 'targz dirname/' 
it will create a filename called '.tar.gz' in the directory 'dirname'
this change removes the last slash from the argument