xslate/p5-Text-Xslate — pull request #103 by hitode909 (2014-01-23 11:39:59+00:00)
Title: Preparing cache directory fails on multi process

When other process creates cache directory between `if(not -e $cachedir) {` and mkpath, mkpath returns false and Xslate throws an exception.
I changed to check whether cachedir exists when mkpath returns false.

## Test

https://github.com/hitode909/p5-Text-Xslate/blob/6100f3466408d683b6e299f2966b86d0eec5253b/t/900_bugs/041_cachedir_other_process.t

## Result

before

```
% prove -v t/900_bugs/041_cachedir_other_process.t
[20:18:34] t/900_bugs/041_cachedir_other_process.t ..
ok 1 - cache directory does not exists
# waiting if(not -e $cachedir) {
# waiting child process
# mkpath on child process
ok 2 - cache_dir seems created on child process
# mkpath on parent pwaiting child process
Xslate: Cannot prepare cache directory .xslate_cache/t/900_bugs/041_cachedir_other_process.t/%2FUsers%2Fhitode909%2Fco%2Fp5-Text-Xslate%2Ft%2Fnr0qd_QVre/hello.txc (ignored): at t/900_bugs/041_cachedir_other_process.t line 40
# Tests were run but no plan was declared and done_testing() was not seen.
Dubious, test returned 60 (wstat 15360, 0x3c00)
All 2 subtests passed
[20:18:34]
```

after

```after
% prove -v t/900_bugs/041_cachedir_other_process.t
[20:19:03] t/900_bugs/041_cachedir_other_process.t ..
ok 1 - cache directory does not exists
# waiting if(not -e $cachedir) {
# waiting child process
# mkpath on child process
ok 2 - cache_dir seems created on child process
# mkpath on parent pwaiting child process
ok 3 - cache directory exists
1..3
ok 356 ms
[20:19:04]
All tests successful.
Files=1, Tests=3, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.13 cusr 0.03 csys = 0.20 CPU)
Result: PASS
```