Fix several bugs preventing file downloads

This is a regression introduced somewhere along the way in the new storage
API system for osTicket.
Merge pull request #743 from greezybacon/issue/download-hash

Fix several bugs preventing file downloads

Reviewed-By: Peter Rotich <peter@osticket.com>