Update test to handle directory creation