Switched to using while IFS=" read -r trick for bash 3.

* readarray/mapfile was introduced in bash 4
  (mywiki.wooledge.org/BashFAQ/061)
* Also use `tail -n 1` to quickly get the last line of stable.txt, when
  key is omitted.