Change acceptable arguments for admin param
Add patches_dir parameter to facilitate testing
Add tests for patch command