Compare unit file sizes as part of determining whether a unit needs to be downloaded

Compare unit file sizes as part of determining whether a unit needs to be downloaded.  This includes:
- publishing the file sizes
- comparing the file size specified in the unit to the file on disk.

Also, slight reworking of published directories (read as distributions).  Fixes case where downloading the tarball associated with a unit referencing a directory in the storage_path would fail because it would try to download the tarball to the storage_path, which is a directory.