Add hook infrastructure to middleman, relates #150