Isolate and expose the new method to get external

Added function getFileContents to use the previously added code for more
robusylt get external file data. Will now attempt to use curl on
external files, then fall back to file_get_content.