Provide a way to add hooks when using --require

A suggestion for a solution to #764