fix \examplecode and \exampledir directive