chore(gitignore): ignore *.swp files
refactor(subprocess): refactor for better mocking, DRY