Fixes #379, adding directory type reference
Merge remote-tracking branch 'upstream/master'