Cleaned up code, bugfix with using regex

I've noticed that its usually a bad idea to use regex is a very blind
fashion. This is because the `re` methods return None when there is no
match and when you *always* expect something to be there and use like a
[0] operation on it, it will bomb. In this case it bombed for me because
there was one app (Microsoft Query) which didn't have the `.app`
extension. Changed this now to a simple split by "/" and take the last
part of it model. We can investigate better ways later. But this at
least I think will *always* work.

Exit with error is a Non-Zero thing.

I didn't understand the necessity of a List Comprehension for writing
the app names to a file. It is no different from using a loop except
that it sits on one line. Changed that to a basic loop structure
Merge pull request #1 from shrayas/clean-up

Cleaned up code, bugfix with using regex