Detect unmanged paths

This PR supercedes #27, aving a cleaned up commit history based on a new version of master branch. Can be merged from my point of view if travis is happy