readline: treat bare \r as a line ending

Fixes #3305
os: rename tmpDir() to tmpdir() for consistency

Make the casing consistent with the other os.* functions but keep
os.tmpDir() around as an alias.