Implements 'apply patch'

Added 'apply patch' functionality to the scripts.

Related to https://github.com/endlessm/eos-shell/issues/2711