Bug fixes for rails_deploy.fact.j2

* Use `has_key('stat')` instead of `stat.exists`.

* Don't assume that `ansible_local` is always defined.