Support paths containing module types

Adds support for paths which contain module types in them. Shoud fix #39 and #40.