fix "~" in if..then..fi for BASH console

Fixes issue #32