Added --no-input option (rework of pull request #30)

I reworked #30 to only include the --no-input option (and a similar one for in your `setup.cfg`).

- Added tests.

- Retained the `optparser` fix from #30.

- Refactored the question asking code, which meant changing some aspects of the original patch. Less module-level globals this way, though.

@mauritsvanrees: please review this code, I've had to make quite some changes in a lot of places. The tests run fine, but I want a second pair of eyes on this one before I pull it into master and release it.