improved handling of rc file

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