Refactoring segments to individual files

The idea is to have an install script that generates the promp
generation script, so that processing for segments that are not needed
is avoided. The script was getting too slow for many people due to all
the checks for the git, hg, svn etc. Also, this will make it cleaner to
add new segments.