Security and compatibility fixes by Hans-Michael Varbaek of Sense of Security
Merge branch 'master' into dev

Conflicts:
	custom-permalinks.php
	readme.txt