Adds folder support to dynamic scripts/stylesheets

Thank you John Hodgkinson !