modified R scripts to work from web interface, improved the prepare_reference_genomes subroutine