Change paths to work everywhere

Paths used to be relative to the document root, however it didn't work if the site was in a subfolder.
The paths were changed to accomodate that.
The python script was changed a bit too because now the paths in the menu depends on whether it is the index or not. (I know that script is baaaad)
Latest commit before proofreading.