Fixed syntax test as it errored when trying to open a directory.