support directory_levels (see issue #151)

Only for Local adapter right now, though support should be easy to add for other adapters.
code cleanup / updates
indents
apply PSR2 rules
Merge branch 'refs/heads/master' into develop