Implemented a 'hook' scheme for running cmds before or after transfers.