Use box directory as temporary directory to avoid cross-device [GH-1199]