Removed trailing spaces.
Replaced Etc.getpwuid.dir calls (and the 'etc' library dependency) with the standard File.expand_path( file, '~' ).