More generic home finding

Reference: https://stat.ethz.ch/pipermail/r-help/2007-March/128217.html
Update home finding to be generic
Merge branch 'chriddyp-patch-1' into marianne-plotly-credentials