Reserve space for 500 apps beforehand
Improve POSIX compatibility (get_current_dir_name is a GNU extension)
Fix loop in main

The old version copied stuff unnecessarily around.
Remove unnecessary strcmp in find_files
Remove compare_cstrings in favor of lambda
getline (POSIX) is more efficient than fgets