Fix crash with an empty programs/foo dir

We should never use the existence of a directory in our source tree to
make a decision, because git doesn't track directory existence, and it's
easy to end up with extraneous directories (containing gitignored files,
eg).  So we should ignore programs/foo directories in apps if they don't
contain package.js.