try this as a workaround, the result is a file URL
tell application "Adobe Photoshop CS3"
activate
set docName to name of current document
end tell
tell application "System Events"
tell process "Adobe Photoshop CS3"
tell (first window whose title starts with docName)
set fileURL to value of attribute "AXDocument"
end tell
end tell
end tell
tell application “Adobe Photoshop CS5.1”
try
set docFilePath to file path of current document
on error msg number errnum
if errnum is 8103 then
display dialog “This document need to be saved.” buttons {“OK”} default button 1
else
display dialog msg buttons {“OK”} default button 1
end if
end try
end tell