Implemented per-directory metadata support

Implemented per-directory metadata file as it was mentioned in #152.
Format is closed to the one described in the issue, but after ```---``` I have a glob pattern terminated by newline (space at the end are considered a part of the pattern). The path in this pattern is relative to the directory with the metadata file.
Metadata in old locations (embedded and *.metadata) override per-directory metadata and the one in a subdirectory overrides the one in a parent directory.