Fixed templates to pick up 404.html and 500.html correctly

Fixed templates to pick up 404.html and 500.html correctly