Made script run on POSIX-conformant shells

- Comparision in line 126 worked only in bash because POSIX string
  comparision only works with single '=' character.