Fixed generation of test app (fixes #33)