Added more tests and swappable implementation to the gem

Added ability to swap to a DirPatcher implementation

[endlessm/eos-shell#2805]