Fixes issue where zero byte file didn't properly encode/decode