Added support for custom directories
Changed Pierluca's sls