I found the way to do it. It was easier than I thought.
Just run matlab (I am working under Linux, ubuntu 14.04) from the folder I want to write the slprj folder to and the slprj will be automatically created in that folder.
The alternative is to open MATLAB from wherever you want and then change the 'Current Folder' to the folder in which you want to create the slprj folder.
I hope this will help someone else.