Remove path.Reduce, use sub-package

Also did some style change to path.go suggested by golint.