Fixes files with a dot before the extension.

With the tar to sar conversion script when a dot was present before the
extension, the tar file's extension was not extracted correctly. This
was due to the regex matching the first occuring pattern instead of the
last.