Did not work for some users...

Hopefully this will be the last commit on this feature (see https://github.com/emoncms/emoncms/commit/6fbc1446023f00d4bd21f571b8195c431da7f201#commitcomment-3230708). 

Sorry for having many pull requests for it, but better have it fully working.

I've tested this on both apache (running at root dir) and nginx (running at sub dir). Please verify at your installation too before merging this one so we can avoid having more issues :)

The first edition actually worked as long as copying the new default settings file was not forgotten, then the previous one changed the behaviour incorrectly when moving from that code.

I've written lots of comments in the code why it's needed and to avoid misunderstandings.

Cheers /Erik