fix overwrite host support and make the code a bit more readable
update PHPDoc
adding simple unit test to test scriptName() under overwrite condition
Merge pull request #6018 from owncloud/fix_overwritehost

fix overwrite host support and make the code a bit more readable