Adding local vs remote guard for files

This adds `File#local()` and `File#remote()` as guards/hooks for plugins primarily. After toying around with this for a while, it seemed like this was the least intrusive way to add the feature. (a little hacky, but it works)

(this will fix #402)
this seems kinda fragile, will this always be the case?