refs #4996 tests should now work in case Piwik is installed in a subdirectory although could not really test it. Also encode redirect uri