Update main.cpp

Add code to keep .desktop parsing only within confines of Desktop Entry section.