Fix incorrect redirect and creation of empty question after uploading
PDF files.

file_save_success was out of scope when used previously. Use a new
variable png_success to indicate that PDF workflow was invoked. Short
circuit the if condition evaluation and thus prevent the creation of a
blank question when the PDF workflow works properly.

References Coursemology/coursemology.org#277