Disable friendly error pages by default when the application environment is set to 'staging' or 'production'.

Fixes issue #1063.