get_url_file_name: Fixed crash on OOM on debug build

This caused a null-pointer dereference which caused a few dozen
torture tests to fail.