Erlang: search apps/, deps/ and libs/

Search apps/, deps/ and libs/ for .hrl and .beam files.
Simplify main/1 heads - deconstructing the list cell by cell is not necessary and hardly more readable.