[RFC] Improve legacy2luatest script.

I noticed that test61 failed in a Travis build of #1403, but re-running the build "fixed" it. Therefore I had a look at porting test61 to lua; while that didn't progress so far, I found a few insufficiencies in the conversion script and fixed them.

Since this is probably not too "reviewable" otherwise, here's the output from the test61 conversion before and after this PR:

https://gist.github.com/fwalch/00398a435d6efbe78eb4

Also note the changed output file name (test61_spec.lua is now 061_test61_spec.lua)