Prevent errors in case #{rails_root}/tmp does not exist

Dir.mkdir is not recursive. i.e - It doesn't do the equivalent of `mkdir -p` but just plain `mkdir`.
And that is a problem if #{rails_root}/tmp is missing. More here.
http://meta.discourse.org/t/keep-getting-the-same-error-every-start/8214
Use FuleUtils.mkdir_p for cleaner code
Merge pull request #1169 from phanimahesh/patch-1

Prevent errors in case #{rails_root}/tmp does not exist