fix file reading so that all lines, not just the first, is read

Signed-off-by: Mattias Andrée <maandree@operamail.com>