snap: check mkdir error in tests