refs #57 added more tests and some bugfixes
Merge branch 'master' of github.com:piwik/piwik