fixed issues with creating correct directory in linux