Fix filename parsing for HIST commands, and update setup.py for HIST's requirements