Apply attributes of directoryhierarchy to directory as well. Fixes #20.