Package.compress_package: fix for files, period in name

* If a period is in the name of a directory package that is being
  compressed, os.path.splitext() splits the name of the directory
  as though it were a file extension.
* If full_path was a file and not a directory, the rsplit and subsequent
  join produces incorrect results, e.g. for /path/to/aip/name.7z:
  /path/to/aip/.7z instead of /path/to/aip/

Refs #7102.
I'm not sure this is possible anyway - don't we vet the path before it gets assigned as an attribute of the `Package` object? If not, I should do that...