mg_send_file fails unchecked if called with a directory name