Fixed incorrect logic for deploy library directory creation