porting path.lua from fbmake 0.1
rewriting main.lua