Fix make directory operation for invalid library name