Added support for subdirectory.