Slightly refactor Chtimes and add support for other variants of setstat.