Fix expiry for useradd provider

This is my third attempt to fix the expiry property for the useradd provider and a follow up of GH-1388 which was reverted because of ruby 1.8.7 incompatibility

I reverted the revert and fixed the ruby 1.8 issue. I also found a bug in the provider when run on Solaris.

I installed ruby 1.8 on my system and the tests do pass now