Move all resolver code to resolver package
Add test for dir resolver