fixing subprocess stuff, and creating media directories manually so permissions work