COOK-4637

Checking for directory existence, otherwise we are creating duplicated resources when the LWRP is called twice.