Test stat/chmod approach with sinon stubs