Added bs_save_string function and associated tests