Making shared.R generic

I think this can be simplified considerably, for clarity.  Using for-loops is not really "the R way of doing things".

Something like:
```
patternStr <- lapply(names(prefixList), function(pn) { paste('"', pn, '/', sep='') })
replacementStr <- lapply(prefixList, function(p) {
    splitDirPath <- strsplit(p$directoryPath, "/+")[[1]]
    paste('"../../shared.R/', splitDirPath[length(splitDirPath)-1], '/', sep="")
})
```
or the same with `vapply(..., character(1))` if those really need to be vectors.