[BACKLOG-194] - Refactor and unit tests for FileResource.doGetFileOrDir
Merge pull request #1720 from brendan-lynch/oemfeaturerequest2

[BACKLOG-194] - Refactor and unit tests for FileResource.doGetFileOrDir