flush stdin before asking for input
Merge pull request #249 from ros-infrastructure/flush_stdin_before_input

flush stdin before asking for input