give 404 error when visiting disabled pages

The theme register and contact scripts will now show a 404 error rather
than die if the corresponding plugin is disabled.