Build phost with rake (refs #277)
Refactor Rakefile (refs #277)