Add support for getting available versions. Fix stderr redirect hangover.