Fix config reads on raspbian

Some non-standard behavior there apparently leads to infinite reads.
Fix originally provided by Paul Delys at alaska.edu 1.5 years ago.