Updated the regexp and added an other test case for sub dirs