Fix possible exception in CopyForm.clean_filename
Make the base template robust even when used for the 500 error message