Update README
Code cleanup and modernization

This change adds ANSI C prototypes, and makes the code compile
without warnings.
Protect against empty shell variables

This change adds missing quoting around possibly empty shell variables.