More 1.5 API usage & PHP returns AJAX response for flash message.

PHP now sends back the Flash message as AJAX response.
Updated to use the 1.5 Request, Config, Log and Folder API.
Tweaked wording of flash message slightly.
Added more exception handling with messages.
Adds folder existence check before renaming anything.
Removes old redirection code (ajax only use).