Validate populate command more rigorously
Fixes #186. Python3 incompatibility.
Merge branch 'master' into develop