use portable conditional expression in test.sh

[[ expression ]] is bash-specific, so we use [ expression ] instead.
Merge pull request #125 from dicej/master

use portable conditional expression in test.sh