A port of AppDirs for R