Add retrieve-dir hook (#9)