Make sure to expand filename when getting definition dir