Make reference a string

Solves #5. Make reference a string with the limitation that it cannot contain invalid filename chars. This limitation is inevitable due to the current implementation where the reference is used to create a directory to store the files.