Test that 'ceylon new' compiles, fix potential NPE

The first commit adds a test for `ceylon new` that checks that the new project compiles (which should close #1446); the second commit fixes potential NPEs that I noticed while writing the test.