fixed bug when locating lib dir

redid last bugfix
Merge pull request #17 from kirbyfan64/master

Fixed bug when locating lib dir