updated getpwuid rspec tests to use a mock object

based on the code provided by richardc (thanks!)