Expose rand_file_name

Fixes: https://bugzilla.osafoundation.org/show_bug.cgi?id=13088