Make open_string() take a length arg, instead of always using strlen().