I created a text file, and renamed it into testTreeGen.py.
The problem
I cannot say for sure what mistake you've made, however, this is the way to properly rename a file:
If the above fails for whatever reason, try the following, otherwise this is bug that you need to report: