repl: use fgets() instead of gets().

According to the man page, gets() could overflow the buffer.
This patch switches the gets() call to the safer fgets().
Merge pull request #1 from tcort/gets

repl: use fgets() instead of gets().