generate_user_files: improve and fix listchoice()

 * listchoice() in generate_user_files.py no longer considers 0 and
   negative values as valid input.
 * 'clist' parameter is now mandatory to avoid entering infinte
   loop.
 * Improved function code and readability.

Change-Id: Id4c891743a38d2b89fcba2f889ab7fc8e6ccd557