Various improvements to the backend upload/download routines.