This does not work yet though, as the redirect() function is unable to handle redirects to app.php/xyz.
Root folder now equals the root folder of the extension.