added path support to splitting scripts