In general we try to avoid manipulating filepaths within QIIME library code since it makes it harder to unit test and limits the type of input to being filesystem-based. Can you please update this function to accept file objects instead of filepaths? The opening/closing of files, creation of directories, etc. can go in the script instead.

It'd also be better form for this method to return the `random_bc_lookup` that it creates, instead of modifying the one that's passed in and returning nothing.