Sort directives hash before writing php.ini template