Refactor epic.s3 set function. Fix epic.pkg download function.