This function takes a file path and returns a string with the file path as a
gfm formatted link that works in Obsidian. If a path
is not given, then the
function will "expand" the file
string to be a full path. This is meant to
expand "~/" to a full path, but can cause issues if you give just a file name
but no context as to the path.