Couple of bugs in latest pull fixed

1. Missed default layout from the generated application
2. NPE if an application doesn't have lib folder (like KaraDemo)