Devoncarew add sample

Add a javascript chrome app sample. Also, fixes an issue in our templating code when the sample has binary files (images).

@umop, @dinhviethoa for review. This fixes #828.