Make the file module work as expected in check mode