CRM-14091, CRM-14092

Resubmit patches from #2431, #2432 as new PR. Changes:
 * Submit against 4.4 instead of master
 * Apply some cleanup (coding conventions)
 * Soften dependency on CRM_Core_Session::setStatus()
 * Be more proactive about creating .htaccess files

Also: Tested in WP