Fix bug: some fs methods should verify the given path

Empty path should not be accepted in some methods.