make stat work with directories too
1.2.1