templates / branches--on commit builtin/apply: make check_apply_state() return -1 instead of die()ing (f36538d)
   1: this is just to ensure the directory exists.