use method to detect home directory if ruby < 1.9