app: fix leak and remove unused variable in file-utils.c
app: add back code that only checks local files for type and permissions

I've seen these tests failing on remote files that load and save just
fine if the test is removed.