Fix mateor/auto-patcher#108 and replace backticks with .

As mentioned in #108, this is a pull request to clean usage of backticks and move to $() and make code cleaner and theoretically more POSIX compliant, nesting, blah blah blah.