Fixed bug in creating directory links