Readlink

I noticed you use "ls -l" for readlink implementation, which is not the best choice ever. There's very robust "readlink" command, and its output is easier to parse (it just prints raw path or nothing on error).

Also I convert absolute links to relative ones, so they are accessible in mounted directory.