Move profile creation into lib/profile (fix #187)
improve profile log messages
improve code style
Fix --profile handling
Rewrite --profile tests
Merge pull request #202 from johannhof/master

Move profile creation into lib/profile (fix #187) r=erikvold