Change to use home directory, add conditional for Mac and Linux