Merge pull request #798 from thoto/feature_lstat