fix should_return_path_from_home test for macos
Fixes the should_return_path_from_home test for mac os so that it does not fail. Mac os users are stored in /Users instead of /home or /root, so the test fails on Mac OS. This fix alters the validation path based on the host operating system. If std::env::consts::OS is "macos" we use "/Users", if it is "linux" we use "/home" or "/root".