Change file mode (thanks to Florian Lehner)