More robust shell detection in GMXRC

To cater for environments that set $shell for a non-csh shell, also
check the contents of the variable.

Fixes #1213

Change-Id: I9135b947529b690a733ea0d7be5e8e507236a735