Simplify check of file types

This is not necessary to check that MAIN or TEST files exist as there
are only these two existing types.

Change-Id: Iff65a8382dcabbb7a45b5f224388e69846519c06