Avoid calling external processes
Python already offers functions for chowning and chmodding files in its standard library. The os module is even already imported. This commit removes external process calls in favor of using these built-in Python functions.