Write .htaccess file

Start rewriting.class.php that should handle conf where url-rewriting is not allowed. One day.
Add unit test to test htaccess generation.
Add .htaccess writing to install process.
Merge branch master